package com.zpself.module.spring.AOP.Proxy实现;

import com.zpself.module.spring.AOP.静态代理.IMath;
import com.zpself.module.spring.AOP.静态代理.MyMath;

public class PorxyTest {

    //实例化一个MathProxy代理对象
    //通过getProxyObject方法获得被代理后的对象
    IMath math;

    public PorxyTest() {
        math = (IMath) new 动态生成案例Proxy().getProxyObject(new MyMath());
    }

    @org.junit.Test
    public void test01() {
        int n1 = 100, n2 = 5;
        math.add(n1, n2);
        math.sub(n1, n2);
        math.mut(n1, n2);
        math.div(n1, n2);
    }


}